package org.example.carsystem.service.impl;

import org.example.carsystem.domain.SysPost;
import org.example.carsystem.domain.vo.PostVo;
import org.example.carsystem.mapper.PostMapper;
import org.example.carsystem.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class PostServiceImpl implements PostService {
    @Autowired
    private PostMapper postMapper;

    @Override
    public Map<String, Object> PostSelectAll() {
        List<PostVo> list = postMapper.PostSelectAll();
        Map<String, Object> map = new HashMap<>();
        map.put("code",200);
        map.put("list",list);
        return map;
    }

    @Override
    public List<SysPost> postSelect(String postCode, String postName, String status) {
        return postMapper.postSelect(postCode,postName,status);
    }
}
